﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections;
using System.Collections.Generic;
using TravelWallet.Types;
using System.Linq;
using System.IO.IsolatedStorage;
using System.Xml.Serialization;
using System.Xml;
using System.Xml.Linq;
using System.Windows.Resources;
using System.IO;

namespace TravelWallet
{
    public partial class LocalStorageModel : IStorageModel
    {



        public static LocalStorageModel LoadPrograms()
        {
            StreamResourceInfo xml = Application.GetResourceStream(new Uri("/TravelWallet;component/pointsprogramdata.xml", UriKind.Relative));

            LocalStorageModel retVal = null;
           

            XmlSerializer serializer = new XmlSerializer(typeof(LocalStorageModel));
            retVal = (LocalStorageModel)serializer.Deserialize(xml.Stream);

            xml.Stream.Close();

            
            return retVal;

        }
    }
}
